package biz;

import java.util.List;
import java.util.Map;

import pojo.PageTeams;
import pojo.Projects;
import pojo.Teams;
import pojo.UserRoleProject;
import pojo.UserTeam;
import pojo.Users;




public interface TeamManagerBiz {
	//申请加入团队模块
	public List<Map<String,String>> getApplyUsers1ByTeamid(int teamid);
	public List<Map<String,String>> getPartApplyUsersByTeamid(int teamid);
	public List<Map<String,String>> getApplyUsers2ByTeamid(int teamid);
	public List<Map<String,String>> getPart2ApplyUsersByTeamid(int teamid);
	public int updateUserTeamIsAccepted(int userid,int teamid);
	public int getApplyTotalNo(int teamid);
	public List<Map<String,String>> appluUserFenYePrev(int applyNowNo,int teamid);
	public List<Map<String,String>> appluUserFenYeNext(int applyNowNo,int teamid);
	//团队创建人
	public List<Map<String, String>> getCreateUserByTeamid(int teamid);
	//切换团队
	public List<Map<String,String>> getAllTeamByUserid(int userid);
	
	
	public Users getUserByUserid(int userid);
	
	//团队成员
	public List<Users> getAllTeamUserByTeamid(int teamid);
	public List<Users> getPartTeamUserByTeamid(int teamid);
	public int getTeamUserTotalNo(int teamid);
	public List<Users> teamUserFenYe(int teamUserNowNo,int teamid);
	public int deleteTeamMember(int userid,int teamid);
	
	
	
	//xuyNJIN
	public List<Map<String,Object>> getTeamByName(String teamName)throws Exception;
	public List<Map<String,Object>> gotoTeamList(int userId)throws Exception;
	public int addTeam(Teams teams) throws Exception;
	public Teams selectTeam(String teamName) throws Exception;
	public int addUserTeam(UserTeam userteam) throws Exception;
	public int updateUsers(Users users) throws Exception;
	public int updateUserp(Users users) throws Exception;
//	public TeamPage findTeamsPage(String teamName,int currentPage,int pageSize) throws Exception;
	public PageTeams getTeams(int currentPage, int pageSize) throws Exception;
//	public PageTeams getTeamsec(String teamName, int currentPage, int pageSize) throws Exception;
	public int addApplyTeam(UserTeam ut);
	public UserTeam checkIsApplied(int teamid,int userid);
	
	
	
	
	
	//项目
	/**
	 * int managerId项目经理的id，String[] s成员id数组
	 */
	public int addProjectAndMember(Projects p,int managerId,String[] s);
	public int addProject(Projects p);
	public int addProjectMember(UserRoleProject urp);
	public List<Projects> getAllProjectsByTeamid(int teamid);
	public List<Map<String,String>> getProjectMember(int projectid);
	
	public int updateProjectMemberMTP(int projectid,int roleid,int urpid);
	public int updateProjectMemberPTM(int projectid,int roleid,int urpid,int type);
	public int deleteProjectMember(int urpid);
	
	public Projects getProjectByProjectid(int projectid);
	public int deleteProjectByProjectid(int projectid);
	public int updateProjectInfoByProjectid(Projects p);
}
